﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MP/Admin.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Admin_User_Default" Theme="Admin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="h" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentHolder" runat="Server">
    <div id="content-box">
        <div class="border">
            <div class="padding">
                <div id="toolbar-box">
                    <div class="t">
                        <div class="t">
                            <div class="t">
                            </div>
                        </div>
                    </div>
                    <div class="m">
                        <div class="toolbar" id="toolbar">
                            <table class="toolbar" summary="">
                                <tr>
                                    <td class="button" id="toolbar-new">
                                        <asp:LinkButton runat="server" ID="lnkAdd" CssClass="toolbar" OnClick="lnkAdd_Click">
                                            <span class="icon-32-new" title="Add"></span>
                                            <asp:Label runat="server" ID="lblAdd" meta:resourcekey="lblAdd" />
                                        </asp:LinkButton></td><td class="button" id="toolbar-delete">
                                        <asp:LinkButton runat="server" ID="lnkDelete" CssClass="toolbar" OnClick="lnkDelete_Click">
                                            <span class="icon-32-delete" title="Delete"></span>
                                            <asp:Label runat="server" ID="lblDelete" meta:resourcekey="lblDelete" />
                                        </asp:LinkButton></td></tr></table></div><div class="header icon-48-user">
                            <asp:Literal runat="server" ID="lblUserManager" meta:resourcekey="lblUserManager" />
                            <div class="clr">
                            </div>
                        </div>
                    </div>
                    <div class="b">
                        <div class="b">
                            <div class="b">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clr">
                </div>
                <div id="element-box">
                    <div class="t">
                        <div class="t">
                            <div class="t">
                            </div>
                        </div>
                    </div>
                    <div class="m">
                        <table summary="">
                            <tr>
                                <td width="100%">
                                    <asp:Label runat="server" ID="lblFilter" meta:resourcekey="lblFilter" />: <asp:TextBox runat="server" ID="txtUserFilter" CssClass="text_area"></asp:TextBox><asp:Button
                                        runat="server" ID="btnFilter" OnClick="btnFilter_Click" meta:resourcekey="btnFilter"
                                        CssClass="button" />
                                    <asp:Button runat="server" ID="btnReset" OnClick="btnReset_Click" meta:resourcekey="btnReset"
                                        CssClass="button" />
                                </td>
                                <td nowrap="nowrap">
                                    <asp:DropDownList runat="server" ID="ddStatus" CssClass="inputbox" AutoPostBack="True"
                                        OnSelectedIndexChanged="ddStatus_SelectedIndexChanged">
                                        <asp:ListItem Value="" meta:resourcekey="ListItemStatus" />
                                        <asp:ListItem Value="1" meta:resourcekey="ListItemActive" />
                                        <asp:ListItem Value="0" meta:resourcekey="ListItemInactive" />
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                        
                        <asp:GridView ID="gv" runat="server" DataKeyNames="UserName" OnRowCreated="gvwUsers_RowCreated" BorderStyle="Solid" BorderWidth="1"
                            CssClass="adminlist" GridLines="None" DataSourceID="ods" EnableSortingAndPagingCallbacks="True"
                            AutoGenerateColumns="false" AllowPaging="True" EnableModelValidation="True" EmptyDataText="Không có user nào">
                            <HeaderStyle CssClass="title" />
                            <RowStyle CssClass="row0" BorderStyle="None"/>
                            <PagerStyle HorizontalAlign="Center" />
                            <Columns>
                                <asp:BoundField HeaderText="Username" DataField="UserName" />
                                <asp:HyperLinkField HeaderText="E-mail" DataTextField="Email" DataNavigateUrlFormatString="mailto:{0}"
                                    DataNavigateUrlFields="Email" />
                                <asp:BoundField HeaderText="CreatedDate" DataField="CreationDate" DataFormatString="{0:MM/dd/yy h:mm tt}" />
                                <asp:BoundField HeaderText="Last Activity Date" DataField="LastActivityDate" DataFormatString="{0:MM/dd/yy h:mm tt}" />
                                <asp:CheckBoxField HeaderText="Status" DataField="IsApproved" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center" />
                            </Columns>
                        </asp:GridView>
                        <asp:ObjectDataSource ID="ods" runat="server" SelectMethod="Select" TypeName="CVTH.Helper.UserHelper"
                            EnablePaging="True" SelectCountMethod="SelectCount" DeleteMethod="Delete">
                            <SelectParameters>
                                <asp:Parameter Name="maximumRows" Type="Int32" />
                                <asp:Parameter Name="startRowIndex" Type="Int32" />
                                <asp:Parameter Name="filter" Type="String" />
                                <asp:Parameter Name="filterType" Type="String" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <input type="hidden" name="hndBoxChecked" id="hndBoxChecked" value="0" />
                        <input type="hidden" name="hndResetFilter" id="hndResetFilter" value="0" />
                        <div class="clr">
                        </div>
                    </div>
                    <div class="b">
                        <div class="b">
                            <div class="b">
                            </div>
                        </div>
                    </div>
                </div>
                <noscript>
                    Warning! JavaScript must be enabled for proper operation of the Administrator back-end.</noscript>
                <div class="clr">
                </div>
                <div class="clr">
                </div>
            </div>
        </div>
    </div>
</asp:Content>
